﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PROAD
{
    public partial class Impressao : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                if (Session["CO_PROFISSIONAL"] != null)
                {
                    if (Session["CO_PERFIL"].ToString() == "0")
                    {
                        lblInfoUsuario.Text = Session["NO_PROFISSIONAL"].ToString() + " - " + Session["DT_ULT_ACESSO"].ToString();
                    }
                    else
                    {
                        Session.RemoveAll();
                        Response.Redirect("/login.aspx");
                    }
                }
                else
                {
                    Session.RemoveAll();
                    Response.Redirect("/login.aspx");
                }
            }
        }



        protected void linkSair_Click(object sender, EventArgs e)
        {
            Session.RemoveAll();
            Response.Redirect("/login.aspx");
        }
    }
}